//
//  LawyerDetailViewController.m
//  Unicorn
//
//  Created by xalo on 16/5/3.
//  Copyright © 2016年 bhj_jun. All rights reserved.
//

#import "LawyerDetailViewController.h"

@interface LawyerDetailViewController ()

@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *corp;
@property (weak, nonatomic) IBOutlet UILabel *phone;
@property (weak, nonatomic) IBOutlet UILabel *email;
@property (weak, nonatomic) IBOutlet UILabel *idno;
@property (weak, nonatomic) IBOutlet UILabel *spe;
@property (weak, nonatomic) IBOutlet UITableView *talktableView;
@property (weak, nonatomic) IBOutlet UIImageView *headImage;
@property (weak, nonatomic) IBOutlet UIButton *descBtn;




@end

@implementation LawyerDetailViewController

- (IBAction)collection:(UIBarButtonItem *)sender {
}

- (IBAction)shareAction:(UIBarButtonItem *)sender {
}

- (IBAction)descAction:(UIButton *)sender {
    
    LawyerInfoViewController *infoVC=[[UIStoryboard storyboardWithName:@"Lawyer" bundle:nil]instantiateViewControllerWithIdentifier:@"infoVC"];
    infoVC.model=self.model;
    [self.navigationController pushViewController:infoVC animated:YES];
}

-(void)setUserInfo{

    self.name.text=self.model.name;
    self.corp.text=self.model.corp;
    self.phone.text=self.model.mobile;
    self.idno.text=self.model.idno;
    if (self.model.spec.length==0) {
       self.spe.text=@"抱歉,律师太忙,忘了设置啦....";
    }else{
    self.spe.text=self.model.spec;
    }
    if (self.model.email.length==0) {
        self.email.text=@"暂时未提供";
    }else{
    self.email.text=self.model.email;
    }
    if (self.model.idno.length==0) {
        self.idno.text=@"抱歉,律师太忙,忘了设置啦....";
    }else{
        self.idno.text=self.model.idno;
    }
    [self.headImage sd_setImageWithURL:[NSURL URLWithString:self.model.img]];
    self.descBtn.backgroundColor=[UIColor yellowColor];
    self.descBtn.layer.cornerRadius=15;
    self.descBtn.layer.masksToBounds=YES;
}




- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setUserInfo];
    
    
    
    
    self.view.backgroundColor=[UIColor cyanColor];
    
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
